STEP 13: We need to ask the player how much money they think is in the piggy bank.

  • Change the string in .ask() to "How much money is in the piggy bank?"

Notice the float() before bank.ask(). Remember, all user input is a string! It must be converted if you want to use it as a number. Since we will be comparing the input stored in guess to savings, we need it to be a float!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)